<?

function smarty_function_rss( $params, $smarty ) {

	$model = $params['model'];
	$plural = ucfirst(Smutty_Utils::pluralize( $model ));
	$url = array(
		controller => 'smutty',
		action => 'rss',
		model => $model
	);

	echo '<link rel="alternate" ' .
		'title="' . $plural . ' RSS" ' .
		'href="' . Smutty_Utils::getUrl($url) . '" ' .
		'type="application/rss+xml" />';

}

?>